package JAVA300.第十一章多线程;

/**
 * 创建线程
 */
public class thread_01_startByExtend extends Thread{

    @Override
    public void run() {
        for (int i= 0;i<10;i++){
            System.out.println("this is thread"+i);
        }
    }

    public static void main(String[] args) {

        thread_01_startByExtend ts = new thread_01_startByExtend();
        ts.start();

        for (int i= 0;i<10;i++){
            System.out.println("this is main"+i);//无规律的交替进行
        }
    }
}
